package com.itheima.date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Demo04 {

    public static void main(String[] args) throws ParseException {
        System.out.println("请输入 yyyy年MM月dd日  格式的日期作为生日");
        String s = new Scanner(System.in).nextLine();
        System.out.println(s);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");

        Date date=sdf.parse(s);
        System.out.println(date);

    }
}
